﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _22_List
{
    class Program
    {
        static void Main(string[] args)
        {
            string str = "djaishdafnuaehfuhnhsauuuudnasdanndajafaga;fjhuaehfu";
            Dictionary<char, int> dic = new Dictionary<char, int>();
            for(int i=0; i<str.Length; ++i)
            {
                if (str[i] == ' ')
                {
                    continue;
                }
                if (dic.ContainsKey(str[i]))
                {
                    dic[str[i]]++;
                }
                else
                {
                    dic[str[i]] = 1;
                }
            }

            foreach(KeyValuePair<char, int> kv in dic)
            {
                Console.WriteLine("{0} ---- {1}", kv.Key, kv.Value);
            }

            Console.ReadKey();
        }
    }
}
